package com.mmlc.network.responsebean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/7/29.
 */
public class CategoryListResponseBean implements Parcelable{


    /**
     * code : 0
     * message : OK
     * data : [{"id":"31","name":"奥莱","logo":"http://api.zuimei.com/uploads/cate_logo/2016-08-26/f33118a4d8339ef984001fba56afbb56.png","pinyin":"","is_recom":"0","list":[{"id":"414","name":"男士","logo":"","pinyin":"nanshi","is_recom":"0","list":[{"id":"468","name":"男士外套","logo":"","pinyin":"nanshiwaitao","is_recom":"0"}]},{"id":"269","name":"女士","logo":"","pinyin":"nvshi","is_recom":"0","list":[{"id":"300","name":"女士外套","logo":"","pinyin":"nvshiwaitao","is_recom":"0"}]},{"id":"531","name":"童装","logo":"","pinyin":"tongzhuang","is_recom":"0","list":[{"id":"532","name":"男童","logo":"","pinyin":"nantong","is_recom":"0"}]}]},{"id":"1013","name":"新品","logo":"","pinyin":"","is_recom":"1","list":[{"id":"25","name":"男士","logo":"http://api.zuimei.com/uploads/cate_logo/2016-08-26/a85e1ecf1304a234ec63fba8a4705b8f.png","pinyin":"","is_recom":"1","list":[{"id":"887","name":"男士外套","logo":"","pinyin":"nanshiwaitao","is_recom":"0"}]},{"id":"27","name":"女士","logo":"http://api.zuimei.com/uploads/cate_logo/2016-08-26/1b3decb85a50b17b95fa49c3fc22de33.png","pinyin":"","is_recom":"1","list":[{"id":"702","name":"女士外套","logo":"","pinyin":"nvshiwaitao","is_recom":"0"}]},{"id":"28","name":"婴童","logo":"http://api.zuimei.com/uploads/cate_logo/2016-08-26/381c35f84aaf684c87b5bf3dcd488ceb.png","pinyin":"","is_recom":"1","list":[{"id":"33","name":"男童","logo":"","pinyin":"nantong","is_recom":"0"}]},{"id":"32","name":"生活馆","logo":"http://api.zuimei.com/uploads/cate_logo/2016-08-26/564bdc73f7af234163ef580d7e81a15f.png","pinyin":"","is_recom":"1","list":[{"id":"234","name":"办公用品","logo":"","pinyin":"bangongyongpin","is_recom":"0"}]}]}]
     */

    private int code;
    private String message;
    /**
     * id : 31
     * name : 奥莱
     * logo : http://api.zuimei.com/uploads/cate_logo/2016-08-26/f33118a4d8339ef984001fba56afbb56.png
     * pinyin :
     * is_recom : 0
     * list : [{"id":"414","name":"男士","logo":"","pinyin":"nanshi","is_recom":"0","list":[{"id":"468","name":"男士外套","logo":"","pinyin":"nanshiwaitao","is_recom":"0"}]},{"id":"269","name":"女士","logo":"","pinyin":"nvshi","is_recom":"0","list":[{"id":"300","name":"女士外套","logo":"","pinyin":"nvshiwaitao","is_recom":"0"}]},{"id":"531","name":"童装","logo":"","pinyin":"tongzhuang","is_recom":"0","list":[{"id":"532","name":"男童","logo":"","pinyin":"nantong","is_recom":"0"}]}]
     */

    private List<DataBean> data;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean implements Parcelable{
        private String id;
        private String name;
        private String logo;
        private String pinyin;
        private String is_recom;
        /**
         * id : 414
         * name : 男士
         * logo :
         * pinyin : nanshi
         * is_recom : 0
         * list : [{"id":"468","name":"男士外套","logo":"","pinyin":"nanshiwaitao","is_recom":"0"}]
         */

        private List<ListBean> list;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getLogo() {
            return logo;
        }

        public void setLogo(String logo) {
            this.logo = logo;
        }

        public String getPinyin() {
            return pinyin;
        }

        public void setPinyin(String pinyin) {
            this.pinyin = pinyin;
        }

        public String getIs_recom() {
            return is_recom;
        }

        public void setIs_recom(String is_recom) {
            this.is_recom = is_recom;
        }

        public List<ListBean> getList() {
            return list;
        }

        public void setList(List<ListBean> list) {
            this.list = list;
        }

        public static class ListBean implements Parcelable{
            private String id;
            private String name;
            private String logo;
            private String pinyin;
            private String is_recom;
            /**
             * id : 468
             * name : 男士外套
             * logo :
             * pinyin : nanshiwaitao
             * is_recom : 0
             */

            private List<ListCBean> list;

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getLogo() {
                return logo;
            }

            public void setLogo(String logo) {
                this.logo = logo;
            }

            public String getPinyin() {
                return pinyin;
            }

            public void setPinyin(String pinyin) {
                this.pinyin = pinyin;
            }

            public String getIs_recom() {
                return is_recom;
            }

            public void setIs_recom(String is_recom) {
                this.is_recom = is_recom;
            }

            public List<ListCBean> getList() {
                return list;
            }

            public void setList(List<ListCBean> list) {
                this.list = list;
            }

            public static class ListCBean implements Parcelable{
                private String id;
                private String name;
                private String logo;
                private String pinyin;
                private String is_recom;



                public String getId() {
                    return id;
                }

                public void setId(String id) {
                    this.id = id;
                }

                public String getName() {
                    return name;
                }

                public void setName(String name) {
                    this.name = name;
                }

                public String getLogo() {
                    return logo;
                }

                public void setLogo(String logo) {
                    this.logo = logo;
                }

                public String getPinyin() {
                    return pinyin;
                }

                public void setPinyin(String pinyin) {
                    this.pinyin = pinyin;
                }

                public String getIs_recom() {
                    return is_recom;
                }

                public void setIs_recom(String is_recom) {
                    this.is_recom = is_recom;
                }

                @Override
                public int describeContents() {
                    return 0;
                }

                @Override
                public void writeToParcel(Parcel dest, int flags) {
                    dest.writeString(this.name);
                    dest.writeString(this.id);
                    dest.writeString(this.logo);
                    dest.writeString(this.pinyin);
                    dest.writeString(this.is_recom);
                }

                public ListCBean() {
                }

                protected ListCBean(Parcel in) {
                    this.name = in.readString();
                    this.id = in.readString();
                    this.logo = in.readString();
                    this.pinyin = in.readString();
                    this.is_recom = in.readString();
                }

                public static final Creator<ListCBean> CREATOR = new Creator<ListCBean>() {
                    @Override
                    public ListCBean createFromParcel(Parcel source) {
                        return new ListCBean(source);
                    }

                    @Override
                    public ListCBean[] newArray(int size) {
                        return new ListCBean[size];
                    }
                };
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeString(this.id);
                dest.writeString(this.name);
                dest.writeString(this.logo);
                dest.writeString(this.pinyin);
                dest.writeString(this.is_recom);
                dest.writeList(this.list);
            }

            public ListBean() {
            }

            protected ListBean(Parcel in) {
                this.id = in.readString();
                this.name = in.readString();
                this.logo = in.readString();
                this.pinyin = in.readString();
                this.is_recom = in.readString();
                this.list = new ArrayList<ListCBean>();
                in.readList(this.list, ListCBean.class.getClassLoader());
            }

            public static final Creator<ListBean> CREATOR = new Creator<ListBean>() {
                @Override
                public ListBean createFromParcel(Parcel source) {
                    return new ListBean(source);
                }

                @Override
                public ListBean[] newArray(int size) {
                    return new ListBean[size];
                }
            };
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.id);
            dest.writeString(this.name);
            dest.writeString(this.logo);
            dest.writeString(this.pinyin);
            dest.writeString(this.is_recom);
            dest.writeTypedList(this.list);
        }

        public DataBean() {
        }

        protected DataBean(Parcel in) {
            this.id = in.readString();
            this.name = in.readString();
            this.logo = in.readString();
            this.pinyin = in.readString();
            this.is_recom = in.readString();
            this.list = in.createTypedArrayList(ListBean.CREATOR);
        }

        public static final Creator<DataBean> CREATOR = new Creator<DataBean>() {
            @Override
            public DataBean createFromParcel(Parcel source) {
                return new DataBean(source);
            }

            @Override
            public DataBean[] newArray(int size) {
                return new DataBean[size];
            }
        };
    }
   /* {
        "code":0,
            "message":"OK",
            "data":[
        {
            "id":"31",
                "name":"奥莱",
                "logo":"http://api.zuimei.com/uploads/cate_logo/2016-08-26/f33118a4d8339ef984001fba56afbb56.png",
                "pinyin":"",
                "is_recom":"0",
                "list":[
            {
                "id":"414",
                    "name":"男士",
                    "logo":"",
                    "pinyin":"nanshi",
                    "is_recom":"0",
                    "list":[
                {
                    "id":"468",
                        "name":"男士外套",
                        "logo":"",
                        "pinyin":"nanshiwaitao",
                        "is_recom":"0"
                }
                ]
            },
            {
                "id":"269",
                    "name":"女士",
                    "logo":"",
                    "pinyin":"nvshi",
                    "is_recom":"0",
                    "list":[
                {
                    "id":"300",
                        "name":"女士外套",
                        "logo":"",
                        "pinyin":"nvshiwaitao",
                        "is_recom":"0"
                }
                ]
            },
            {
                "id":"531",
                    "name":"童装",
                    "logo":"",
                    "pinyin":"tongzhuang",
                    "is_recom":"0",
                    "list":[
                {
                    "id":"532",
                        "name":"男童",
                        "logo":"",
                        "pinyin":"nantong",
                        "is_recom":"0"
                }
                ]
            }
            ]
        },
        {
            "id":"1013",
                "name":"新品",
                "logo":"",
                "pinyin":"",
                "is_recom":"1",
                "list":[
            {
                "id":"25",
                    "name":"男士",
                    "logo":"http://api.zuimei.com/uploads/cate_logo/2016-08-26/a85e1ecf1304a234ec63fba8a4705b8f.png",
                    "pinyin":"",
                    "is_recom":"1",
                    "list":[
                {
                    "id":"887",
                        "name":"男士外套",
                        "logo":"",
                        "pinyin":"nanshiwaitao",
                        "is_recom":"0"
                }
                ]
            },
            {
                "id":"27",
                    "name":"女士",
                    "logo":"http://api.zuimei.com/uploads/cate_logo/2016-08-26/1b3decb85a50b17b95fa49c3fc22de33.png",
                    "pinyin":"",
                    "is_recom":"1",
                    "list":[
                {
                    "id":"702",
                        "name":"女士外套",
                        "logo":"",
                        "pinyin":"nvshiwaitao",
                        "is_recom":"0"
                }
                ]
            },
            {
                "id":"28",
                    "name":"婴童",
                    "logo":"http://api.zuimei.com/uploads/cate_logo/2016-08-26/381c35f84aaf684c87b5bf3dcd488ceb.png",
                    "pinyin":"",
                    "is_recom":"1",
                    "list":[
                {
                    "id":"33",
                        "name":"男童",
                        "logo":"",
                        "pinyin":"nantong",
                        "is_recom":"0"
                }
                ]
            },
            {
                "id":"32",
                    "name":"生活馆",
                    "logo":"http://api.zuimei.com/uploads/cate_logo/2016-08-26/564bdc73f7af234163ef580d7e81a15f.png",
                    "pinyin":"",
                    "is_recom":"1",
                    "list":[
                {
                    "id":"234",
                        "name":"办公用品",
                        "logo":"",
                        "pinyin":"bangongyongpin",
                        "is_recom":"0"
                }
                ]
            }
            ]
        }
        ]
    }*/

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.code);
        dest.writeString(this.message);
        dest.writeTypedList(this.data);
    }

    public CategoryListResponseBean() {
    }

    protected CategoryListResponseBean(Parcel in) {
        this.code = in.readInt();
        this.message = in.readString();
        this.data = in.createTypedArrayList(DataBean.CREATOR);
    }

    public static final Creator<CategoryListResponseBean> CREATOR = new Creator<CategoryListResponseBean>() {
        @Override
        public CategoryListResponseBean createFromParcel(Parcel source) {
            return new CategoryListResponseBean(source);
        }

        @Override
        public CategoryListResponseBean[] newArray(int size) {
            return new CategoryListResponseBean[size];
        }
    };
}
